function Controller() {}
Controller.prototype.update = function () {
  console.log(this.name + '->update')
}

function UserController(name) {
  this.name = name
}

UserController.prototype = Object.create(Controller.prototype)
UserController.prototype.view = function () {
  console.log('UserContorller@view')
}

let lisi = new UserController('李四')

function PackageController() {}
PackageController.prototype = Object.create(Controller.prototype)
PackageController.prototype.view = function () {
  console.log('packageContorller@view')
}
const package = new PackageController()

lisi.update()

// UserController.__proto__.view = function () {
//   console.log(this)
// }
// UserController.view()

// let a = { name: 'yahoo' }
// //1. 创建新对象 2.新对象的原型是　a
// let b = Object.create(a)

// console.dir(b)

function A() {}
A.prototype.run = function () {}

function B() {}

B.prototype = Object.create(A.prototype)

B.prototype.show = function () {}

console.dir(B)
